import {request} from 'ice';

export default {
  async getDefPage(page, size, filter) {
    return await request.get('/dataDef/structure/search', {
      params: {
        'page': page,
        'pageSize': size,
        'searchText': filter.searchText,
        'areaCode': filter.areaCode,
      }
    });
  },
  async addDefInfo(defInfo) {
    return await request.post('/dataDef/structure/save', defInfo);
  },
  async updateDefInfo(defInfo) {
    return await request.post('/dataDef/structure/update', defInfo);
  },
  async deleteDefInfo(uid) {
    return await request.delete(`/dataDef/structure/${uid}`);
  },
}
